<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<base href="<%=basePath%>">

		<title>员工信息显示</title>

		<meta http-equiv="pragma" content="no-cache">
		<meta http-equiv="cache-control" content="no-cache">
		<meta http-equiv="expires" content="0">
		<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
		<meta http-equiv="description" content="This is my page">
		<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
		<link rel="stylesheet" type="text/css" href="./pages/wk/css/style.css">

	</head>
	<script type="text/javascript">
	function check(empno){
		if(confirm("确定删除？"+empno)){
			window.location="wk/empAction!delInfo.action?empno="+empno;
		}
	}
	
	</script>

	<body>
	<center>
		<font class="bigFont">员工管理</font>
		<br />
		<a href="wk/empAction.action">显示员工</a>
		<a href="pages/wk/jsp/empManage/addEmp.jsp">添加员工</a>
		<table>
			<tr>
				<th>
					员工编号
				</th>
				<th>
					真实姓名
				</th>
				<th>
					员工性别
				</th>
				<th>
					员工工资
				</th>
				<th>
					联系号码
				</th>
				<th>
					员工邮箱
				</th>
				<th>
					员工住址
				</th>
				<th>
					所属部门
				</th>
				<th>
					员工职位
				</th>
			    <th>
					操作
				</th>
			</tr>
			<s:iterator value="emps" var="emp">
				<tr>
					<td>
						<s:property value="#emp.empno" />
					</td>
					<td>
						<s:property value="#emp.realname" />
					</td>
					<td>
						<s:property value="#emp.sex" />
					</td>
					<td>
						<s:property value="#emp.sal" />
					</td>
					<td>
						<s:property value="#emp.phone" />
					</td>
					<td>
						<s:property value="#emp.email" />
					</td>
					<td>
						<s:property value="#emp.addr" />
					</td>
				    <td>
						<s:property value="#emp.dept.dname" />
					</td>
					<td>
						<s:property value="#emp.oaRole.rname" />
					</td>
					<td>
						<a href="wk/empAction!getInfo.action?empno=<s:property value="#emp.empno" />">修改</a>
						<a href="javascript:check(<s:property value="#emp.empno" />)"/>删除</a>
					</td>
				</tr>
			</s:iterator>
		</table>
	</center>
	</body>
</html>
